from django.contrib import admin
from wagglyblog.models import Category, Post

class CategoryAdmin(admin.ModelAdmin):
    list_display = ('title', 'description', 'slug')
    prepopulated_fields = {'slug': ("title",)}

class PostAdmin(admin.ModelAdmin):
    list_display = ('id', 'title', 'author', 'pub_date', 'allow_comments', 'is_published', 'category_list')
    prepopulated_fields = {'slug': ("title",)}

admin.site.register(Category, CategoryAdmin)
admin.site.register(Post, PostAdmin)

